//
// Created by ZLY on 2025/5/10.
//

#ifndef UI_MOUSE_H
#define UI_MOUSE_H

#include "../core/object_screen.h"
#include "../affiliate/sprite.h"

class UIMouse : public ObjectScreen {
protected:
    Sprite *sprite1_ = nullptr;
    Sprite *sprite2_ = nullptr;
    float timer_ = 0;

public:
    static UIMouse *addUIMouseChild(Object *parent, const std::string &file_path1, const std::string &file_path2,
                                    float scale = 1.0f, Anchor anchor = Anchor::CENTER);

    void setSprite1(Sprite *sprite1) {
        sprite1_ = sprite1;
    }

    void setSprite2(Sprite *sprite2) {
        sprite2_ = sprite2;
    }

    Sprite *getSprite1() const {
        return sprite1_;
    }

    Sprite *getSprite2() const {
        return sprite2_;
    }

    void update(float dt) override;
};


#endif //UI_MOUSE_H
